<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>
<body>
	<script>
		const p= new Promise((resolve,reject)=>{
			let a="错了"
			resolve(a)//reject函数调用相当执行了then方法的第二个参数回调函数
		})
	const pr=p.then((res)=>{
			console.log("then成功",res);
		},(error)=>{
			console.log("then失败",error);//res表示的是reject函数的参数，
		})
		console.log("111",pr);
	</script>
</body>
</html>